save To Archive
Saves the current scene and all of its referenced assets into an archive. The archive contains all assets, that were accessible when this function was called. Blocks in the archived scene reference assets relative from to the location of the scene file. These references are resolved when loading such a scene via load.
While a font loads, its text is laid out with another font. When the text's size follows its content, a scene archived before the font arrives can differ from one archived after it. To compare two archives, first call engine.block.forceLoadResources(listOf(scene)), then compare the scene.scene files inside them. Each archive entry stores the time of the save. forceLoadResources throws when a resource fails to load, and you can still save the scene then.
Cancelling the coroutine stops the save.
Return
a serialized scene archive in zip format. From Android 9 a buffer of 1 MiB or more is a direct buffer over a temp file of the engine, without a copy and without a backing array: read it with get, not array. The file goes once the buffer and every view of it are collected.
Parameters
the scene to archive.
optional settings, such as compression for the scene inside the archive. Bundled media is always stored uncompressed, because it already is in compressed formats.